﻿using System;

namespace Loki.UI
{
    /// <summary>
    /// Base interface for views.
    /// </summary>
    public interface IModalView
    {
        /// <summary>
        /// Gets or sets the view model.
        /// </summary>
        /// <value>The view model.</value>
        IModalViewModel ViewModel { get; set; }

        /// <summary>
        /// Occurs when the view is unloaded.
        /// </summary>
        event EventHandler Clean;

        /// <summary>
        /// Shows this instance.
        /// </summary>
        bool? ShowDialog();
    }

    /// <summary>
    /// Base interface for views.
    /// </summary>
    /// <typeparam name="TViewModel">The type of the view model.</typeparam>
    public interface IModalView<TViewModel> : IDisposable where TViewModel : IModalViewModel
    {
        /// <summary>
        /// Gets or sets the view model.
        /// </summary>
        /// <value>The view model.</value>
        TViewModel ViewModel { get; set; }
    }
}